package org.particles.domain.sim;

import java.util.List;

import org.particles.domain.Statistic;
import org.particles.domain.world.World;


/**
 * responsible for world creation. is used to save world
 * creation instructions in order to be able to switch
 * between different simulations.
 */
public interface SimulationCase {
	
	World createWorld();

	String getName();
	
	World getWorld();
	
	/**
	 * changes a simulation parameter. will be called usually by UI.
	 * @see SimulationCase#availableParams() availableParams
	 * @return true if parameter was recognized and changed.
	 */
	boolean changeParam(int paramCode, double newValue);
	
	/**
	 * @return true if simulation must be recreated after calling
	 * {@link #changeParam changeParam} method.
	 */
	boolean mustRecreate();
	
	/**
	 * will be called usually by UI to offer simulations
	 * parameters for adjusting.
	 * @return for adjusting available simulation parameters.
	 * @see SimulationCase#changeParam(int, double) changeParam
	 */
	List<SimParam> availableParams();
	
	/**
	 * @return statistic to simulation parameters.
	 */
	List<Statistic> getStatistics();
	
	void updateStatistics();
	
	/** deletes statistic data. */
	void clearStatistic();
	
}
